package fun.linze.product.controller;


import fun.linze.product.bean.Product;
import fun.linze.product.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ProductController {
    @Autowired
    private ProductService prodctService;



    @GetMapping("/product/{id}")
    public Product getProduct(@PathVariable("id") Long productId) {


        System.out.println(("hello "));
        return prodctService.getProductById(productId);



    }
}
